package two_xia.ex9.Demo01;

public class Paizhang extends Officer {
    private Officer nextOfficer;

    public Paizhang(Officer nextOfficer) {
        this.nextOfficer = nextOfficer;
    }

    @Override
    public void action(Mission mission) {
        if (mission.getEnemy() >= 50) {
            System.out.print("排长转达营长->");
            nextOfficer.action(mission);
        } else {
            System.out.println("排长下达作战命令!");
        }
    }
}
